Field of the Invention
The present invention relates to an image coding apparatus, an image coding method, and a recording medium storing a program for causing a computer to perform the image coding method.
Description of the Related Art
As a coding system to be used in moving image compression recording, the video coding format of H.264/MPEG-4 AVC (hereinafter, called H.264) has been known. In recent years, an activity for international standardization of the further effective coding system has been started, and the JCT-VC (Joint Collaborative Team on Video Coding) was established. The JCT-VC has proceeded with standardization of an HEVC (High Efficiency Video Coding) system (hereinafter, called HEVC). In the HEVC, to improve coding efficiency, intra-frame prediction (hereinafter, called intra prediction) for which correlation between pixels in a frame is utilized and inter-frame prediction (hereinafter, called inter prediction) for which temporal correlation between different frames is utilized are performed to perform coding of prediction errors.
The intra prediction is performed based on the size of an intra prediction block (hereinafter, called intra prediction block size) being a unit of prediction. In the HEVC, as the intra prediction block size, it is possible to use five kinds of sizes of horizontal 4 pixels and vertical 4 pixels (hereinafter, called 4×4 pixels), 8×8 pixels, 16×16 pixels, 32×32 pixels, and 64×64 pixels. Further, in the HEVC, 35 intra prediction modes as illustrated in FIG. 9 are defined to further achieve higher efficient coding.
Moreover, in the HEVC, in a CTU (Coding Tree Unit) to be used as a coding block unit, it is possible to mixedly use an intra prediction block for the intra prediction and an inter prediction block for the inter prediction. Incidentally, in the H.264, it is impossible to mix the intra prediction block for the intra prediction and the inter prediction block for the inter prediction in a macro block being a coding unit.
As described above, the five kinds of intra prediction block sizes can be provided and the 35 intra prediction modes are defined in the HEVC. Therefore, when an optimum combination is selected from the many intra prediction block sizes and the many intra prediction modes, a large operation amount is necessary. In this connection, a method of performing a pipeline process in units of coding block is conceivable.
In the HEVC, since it is necessary to calculate a predictive generated code amount of each intra prediction mode to select an optimum intra prediction mode, it is necessary to refer to the intra prediction modes of the neighboring blocks. In a case where the pipeline process is performed to the determination of the intra prediction mode, there is a case where the intra prediction modes of the neighboring blocks are not settled when the intra prediction mode of the target processing block is determined. As a result, the code amount necessary for selecting the intra prediction mode of the target processing block cannot be calculated, and thus there is a problem that it is impossible to select the optimum intra prediction mode. In the method disclosed in Japanese Patent Application Laid-Open No. 2006-005438, in the case where the intra prediction mode of the adjacent block is not settled, the above problem is solved by using the intra prediction mode already settled in another block. Moreover, in the method disclosed in Japanese Patent Application Laid-Open No. 2009-177352, in the case where the intra prediction mode of the adjacent block is not settled, the above problem is solved by using the intra prediction mode in the temporally closest block.
However, in the HEVC, the intra prediction block for the intra prediction and the inter prediction block for the inter prediction can mixedly exist within the CTU being the coding tree unit. Therefore, even if the intra prediction mode of a certain block in the CTU is once determined by the intra prediction mode determining process, there is a case where the determined intra prediction mode is decided as the inter prediction mode in the later pipeline-stage process and thus replaced by the inter prediction mode.
In such a case, in the stage of the intra prediction mode determining process at the early part of the pipeline process, it is impossible to distinguish whether the intra prediction modes of the neighboring blocks of the target processing block are replaced by the inter prediction modes by means of the later pipeline-stage process. Therefore, since it is impossible to calculate the code amount necessary for selecting the intra prediction mode of the target processing block, there is a new problem that the optimum intra prediction mode cannot be selected. The methods disclosed in Japanese Patent Application Laid-Open No. 2006-005438 and Japanese Patent Application Laid-Open No. 2009-177352 described above cannot cope with the new problem.